home *** CD-ROM | disk | FTP | other *** search
/ Internet 53 / INTERNET53.iso / pc / software / windows / building / coldfusion studio evaluation / data1.cab / CFS_Wizards / CFML / Library_FileLibrary.wml < prev    next >
Encoding:
Text File  |  1998-10-08  |  1.3 KB  |  57 lines

  1. <WIZSET LibraryDirectory = Trim(LibraryDirectory)>
  2. <WIZIF Right( LibraryDirectory, 1 ) EQ '\'>
  3.     <WIZSET LibraryDirectory = Left( LibraryDirectory, Len(LibraryDirectory) - 1 )>
  4. </WIZIF>
  5.  
  6. <!--- parameters --->
  7. <CFSET LibraryDirectory = "$${LibraryDirectory}">
  8.  
  9. <HTML><HEAD>
  10.     <TITLE>$${ApplicationName} - Library Content</TITLE>
  11. </HEAD><BODY bgcolor="ffffff">
  12.  
  13. <FONT size="+1">$${ApplicationName}</FONT> <BR>
  14. <FONT size="+2"><B>Library Content</B></FONT>
  15.  
  16. <P>
  17.  
  18. <CFDIRECTORY
  19.     action="LIST"
  20.     directory="#LibraryDirectory#"
  21.     name="GetFiles"
  22. >
  23.  
  24.  
  25. <TABLE cellspacing=0 cellpadding=2>
  26. <TR bgcolor="cccccc">
  27.     <TD width=300><B>File</B></TD>
  28.     <TD><B>Size</B></TD>
  29.     <TD><B>Last Modified</B></TD>
  30. </TR>
  31.  
  32. <CFSET Row = 1>
  33. <CFOUTPUT query="GetFiles">
  34. <CFIF Type is "FILE">
  35. <TR bgcolor="#IIf(Row Mod 2, DE('ffffff'), DE('ffffcf'))#">
  36.     <TD width=300>
  37.         <A href="$${SafeApplicationName}_OpenFile.cfm/#Replace(Name,' ','','ALL')#?ServerFile=#URLEncodedFormat(Name)#">#Name#</A>
  38.     </TD>
  39.     <TD>#Size#</TD>
  40.     <TD nowrap>#DateLastModified#</TD>
  41.  
  42.     <CFSET Row = Row + 1>
  43.  
  44. </TR>
  45. </CFIF>
  46. </CFOUTPUT>
  47.  
  48. <CFOUTPUT>
  49. <TR bgcolor="#IIf(Row Mod 2, DE('ffffff'), DE('ffffcf'))#">
  50.     <TD colspan=3>[<A href="$${SafeApplicationName}_FileForm.cfm">Upload New File</A>]
  51. </TR>
  52. </CFOUTPUT>
  53.  
  54. </TABLE>
  55.  
  56. </BODY></HTML>
  57.